Omit buffer_slot_type_mismatch and use generic predicates to enforce
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 10 Jan 2013 10:30:16 +0000 (14:30 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 10 Jan 2013 10:30:16 +0000 (14:30 +0400)
commitf04c892336153f1a82cbccf0d0d49d41d958b85e
treec489d06595733416701585d8e553a415e1b1f502
parentfc5321937690915cd68390b184ba81d35cceb350
Omit buffer_slot_type_mismatch and use generic predicates to enforce
the type of per-buffer values where appropriate.
* src/lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
predicate, which is how it's really used now.  Adjust comment.
* src/buffer.h (buffer_slot_type_mismatch): Remove prototype.
* src/buffer.c (buffer_slot_type_mismatch): Remove.
(DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
predicate.  Adjust comment.
(syms_of_buffer): Use Qsymbolp for major-mode.  Use Qintegerp for
fill-column, left-margin, tab-width, buffer-saved-size,
left-margin-width, right-margin-width, left-fringe-width,
right-fringe-width, scroll-bar-width and buffer-display-count.
Use Qstringp for default-directory, buffer-file-name,
buffer-file-truename and buffer-auto-save-file-name.  Use Qfloatp for
scroll-up-aggressively and scroll-down-aggressively.  Use Qnumberp for
line-spacing.
* src/data.c (store_symval_forwarding): Adjust to call the predicate.
* lisp/cus-start.el (toplevel): Only allow float values for
scroll-up-aggressively and scroll-down-aggressively.
Allow any number for line-spacing.
lisp/ChangeLog
lisp/cus-start.el
src/ChangeLog
src/buffer.c
src/buffer.h
src/data.c
src/lisp.h